﻿using MyCode.Project.Domain.Message.Response.EnterpriseWechat;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyCode.Project.OutSideService
{
    public interface IEnterpriseWechatService
    {
        /// <summary>
        /// 得到AccessToken，有效期7200秒
        /// </summary>
        /// <param name="corpId">企业id</param>
        /// <param name="secret"></param>
        /// <returns></returns>
        string GetAccessToken(string corpId, string secret);

        /// <summary>
        /// 取得通讯录的部门列表
        /// </summary>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        List<DepartmentHasChild> GetDepartmentList(string accessToken, string corpId = "", string secret = "");

        /// <summary>
        /// 得到部门的员工列表
        /// </summary>
        /// <param name="accessToken">通讯录的token</param>
        /// <param name="departmentId">部门id</param>
        /// <param name="fetch_child">是否递归获取子部门下面的成员：1-递归获取，0-只获取本部门</param>
        /// <returns></returns>
        List<DepartmentMemberInfo> GetDepartmentMemberList(string accessToken, long departmentId, string corpId = "", string secret = "", int fetch_child = 0);

        /// <summary>
        /// 获取员工信息
        /// </summary>
        /// <param name="userId">员工id</param>
        /// <returns></returns>
        EnterpriseEmployeeInfo GetEmployeeInfo(string userId, string corpId, string secret);

        /// <summary>
        /// userid转openid
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="corpId"></param>
        /// <param name="secret"></param>
        /// <returns></returns>
        UserIdChangeOpenIdResp GetOpenidByUserid(string userId, string corpId = "", string secret = "");





    }
}
